Software testing is an ongoing task in computer software program development and maintenance which requires a large portion of development time, computer and human resources, and effort. In particular, efficient testing and debugging of software that comprises a portion of an operating system in a controlled testing environment is often difficult due to the inherent nature of the software being tested.
An operating system may generally be described as software which provides an interface between hardware resources and a user to enable utilization of the hardware resources, for example.
Testing software may comprise exercising untested code, such as by executing all possible flow paths through a routine, to uncover existing software bugs. Once a problem is known, a testing environment must facilitate reproducing the problem, isolating the cause of the problem, and adequately testing possible solutions to the problem.
In order to properly test software, the testing environment must be flexible and rich enough to reproduce a wide range of problems. Then to adequately test a solution to a problem, the testing environment must also provide for replication of actual real-time conditions.
A user performing testing must be allowed to control the testing, such as by issuing commands that enable the user to single step through a portion of the code being tested. The user may also inquire about the state of the testing environment to aid in problem isolation and determining the cause of a problem, for example, a user may inquire about the state of an operating system by examining register contents.
Remote debugging is one method that facilitates problem isolation and determination and replication of real-time conditions. Remote debugging provides such a testing environment for debugging an operating system, for example, by having a first computer system that controls the testing and comprises a tested operating system connected to a second computer system which may comprise operating system code being tested. Controlling the testing from the first computer system allows a problem that is encountered on the second computer system during testing to readily be attributed to the untested operating system thereby facilitating problem isolation.
In existing remote debuggers, such as Remote dbx on Unix platforms and Hewlett Packard's RT kernel debugger, the two systems communicate through a dedicated communication line which may have a low communication bandwidth which generally makes debugging tasks slow. Further, a dedicated point-to-point connection is required between every two computer systems for each remote debugging session. In dedicated testing environments with point-to-point connections, such as a serial line connection, the computer systems generally must be in close physical proximity which limits the flexibility of the testing environment.
Generally, in remote debugging it is desirable to use a communication medium which removes such restrictions.
It is desirable to use a communication medium which has a high communication bandwidth and affords a flexible testing environment.
It is desirable to use an existing computer system without having to specify new system configurations for debugging purposes. Further, it is desirable that the communication medium not impose a requirement for close physical proximity between the first and second computer systems.
In remote debugging, a user of the first computer system may control the testing by entering commands which result in one or more corresponding messages being exchanged between the two computer systems. It is desirable to have an efficient exchange of messages which correctly implements a given command. For example, a message exchange may be efficient by limiting the number of messages exchanged. Further, it is desirable to define an efficient division of labor of remote debugging tasks between the computer systems while simultaneously providing an adequate testing environment.
Other problems which may be dependent on the communications medium may arise in remote debugging. For example, if there is a problem with the hardware of the communications medium and the remote debugging session is terminated, it is desirable for the second computer system that comprises code being tested to efficiently and automatically restore its memory contents that may have been changed during the remote debugging session.
It is desirable to provide a method and apparatus for remote software testing that overcomes the foregoing and other disadvantages of remote software testing techniques and problems, and which further provide a more efficient means of remote software testing, and save software development time and resources. It is to these ends the present invention is directed.